package com.woniuxy.gateway.controller;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 周川雄
 * @date 2022/1/27 13:33
 */
@RestController
public class testController {

    @Resource
    private StringRedisTemplate srt;

    @GetMapping("/aaa")
    public String aaa() {
        srt.opsForValue().set("111","测试redis");
        return "测试"+srt.opsForValue().get("111");
    }
}
